<include file="common:header" />
	<style>
		.m{ width: 100%;position:relative;}
		.m video{width:100%;}
	</style>

	<div class="m"><!-- poster="__PRIVATE__/images/logo3.png" -->
		<video id="my-video" class="video-js" name="video"  preload="auto" 
		   data-setup="{}" playsinline  webkit-playsinline="true" x-webkit-airplay="true" -webkit-playsinline poster="__PRIVATE__/images/yayababy.png">
			<source src="/upload/yayababy视频.mp4" type="video/mp4">

		  </video>
		  <!-- <button id="player" class="pause">播放</button> -->
		  <img id="player" class="pause" src="__PRIVATE__/images/video_start.png" check="0"/>
		  <!-- <div>【系统检测到您尚未付款，该视频仅能播放2秒】</div> -->
		  <div style="width:100%;">
			    <a href="{:U(MODULE_NAME.'/index/pre_purchase')}">
					<img src="__PRIVATE__/images/yuyueimg.png" style="width:100%;"/>
				</a>
		  </div>
		  <script type="text/javascript">
		  $playbtntop = $('video').height()*0.7; 
		  $playbtnwidth = $('video').width()*0.01; 
		  $('#player').css({'position':'absolute','text-align':'center','left':$playbtnwidth,'top':$playbtntop});
		  $('#player').click(function(){
			  $('video').click();
		  });
		  $('video').click(function() {
			  if ($('#player').hasClass('pause') && $('#player').attr('check')==0) {
			  $("video").trigger("play");
			  $('#player').removeClass('pause');
			  $('#player').addClass('play');
			  $('#player').css('display','none');
			  } else {
			  $("video").trigger("pause");
			  $('#player').removeClass('play');
			  $('#player').addClass('pause');
			  $('#player').css('display','block');
			  $('#player').attr('src','__PRIVATE__/images/video_start.png');
			  }
		  });
		  var md=document.getElementsByTagName("video")[0];
		    md.addEventListener("ended",function(){
		    	layer.open({
  					style:'font-size:1.6rem;',
  					content:"播放结束",
  					time:2,
  					end:function(){
  						$('video').click();
  					}
  				});
		  });
		    
		    
		    
		  </script>
	</div>

</body>
</html>
